﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    $(function () {
        initControl();
    });
    function initControl() {
        $("#F_DbName").bindSelect()
        $("#F_BackupType").bindSelect()
    }
    function submitForm() {
        if (!$('#form1').formValid()) {
            return false;
        }
        $.submitForm({
            loading: "正在备份数据...",
            url: "/SystemSecurity/DbBackup/SubmitForm",
            param: $("#form1").formSerialize(),
            success: function () {
                $.currentWindow().$("#gridList").trigger("reloadGrid");
            }
        })
    }
</script>

<form id="form1">
    <div style="margin-bottom: 0px; border-radius: 0px;" class="alert alert-warning alert-dismissable">
        <strong>注意：</strong>&nbsp;备份成功后，请将备份文件下载到本地保存！
    </div>
    <div style="padding-top: 20px; margin-right: 20px;">
        <table class="form">
            <tr>
                <th class="formTitle">数据库名</th>
                <td class="formValue">
                    <select id="F_DbName" name="F_DbName" class="form-control required">
                        <option value="NFineBase">NFineBase</option>
                    </select>
                </td>
            </tr>
            <tr>
                <th class="formTitle">备份名称</th>
                <td class="formValue">
                    <input id="F_FileName" name="F_FileName" type="text" class="form-control required"  value="@NFine.Code.Common.CreateNo()" placeholder="请输入备份名称" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">备份模式</th>
                <td class="formValue">
                    <select id="F_BackupType" name="F_BackupType" class="form-control required">
                        <option value="1">完整备份</option>
                        <option value="2">差异备份</option>
                    </select>
                </td>
            </tr>
            <tr>
                <th class="formTitle" valign="top" style="padding-top: 11px;">备份说明
                </th>
                <td class="formValue">
                    <textarea id="F_Description" name="F_Description" class="form-control" style="height: 60px;"></textarea>
                </td>
            </tr>
        </table>
    </div>
</form>
